var WxParse = require('../../wxParse/wxParse.js');
var app = getApp();
Page({
	data:{
		imgpath: app.setting.apiimgpath,
		Merchant:'',
		couponlist:{},
		goodslist:{}
	},
	dialing:function(){
		wx.makePhoneCall({
			phoneNumber:this.data.Merchant.tel
		})
	},
	onLoad:function(option){
		var that = this;
		app.request('/api/Seller/getSellerInfo', {merchantid:option.merchantid}, function(res){
			if(res.code == '0'){
				WxParse.wxParse('content', 'html', res.data.introduce, that, 5);
				that.setData({
					Merchant:res.data,
					couponlist:res.data.couponlist,
					goodslist:res.data.goodslist
				})
			}
		});
	}
})
